class Framework
{
private:
    sf::RenderWindow Win;
    std::vector<Box*> ObjectList;
public:
    Framework(sf::Vector2f);
    virtual void CreateScene();
    void Render();
    void Run();
    void CreateObject(int type);
    bool IsOpen();
};

Framework::Framework(sf::Vector2f Size)
{
    Win.Create(sf::VideoMode((int)Size.x, (int)Size.y, 32), "Render", sf::Style::Close);
}

void Framework::Render()
{
    for(unsigned int i = 0; i < ObjectList.size(); i++)
    {
        ObjectList[i]->Render(Win);
    }
}

void Framework::CreateObject(int type)
{
    switch(type)
    {
        case 1: //Block
            ObjectList.push_back(new Box());
        break;
        default:
        break;
    }
}

bool Framework::IsOpen()
{
    return Win.IsOpened();
}

void Framework::Run()
{
    this->CreateScene();
    while(this->IsOpen())
    {
        Win.Clear();
        this->Render();
        Win.Display();
    }
}
